package com.cyh.testdesignpattern.chain;

import android.util.Log;

//主任
public class DepartmentApprover extends Approver {
    public DepartmentApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if(purchaseRequest.getPrice() <= 5000) {
            Log.i("DepartmentApprover", "---请求id=" + + purchaseRequest.getId() + "--被--" + name + "--处理了");
        } else {
            approver.processRequest(purchaseRequest);
        }
    }
}
